package com.ruoyi.system.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.system.domain.PStoreProductRelation;
import com.ruoyi.system.domain.vo.PStoreProductRelationVo;
import com.ruoyi.common.core.mapper.BaseMapperPlus;
import org.apache.ibatis.annotations.Param;

/**
 * 商品点赞和收藏Mapper接口
 *
 * @author ruoyi
 * @date 2022-08-01
 */
public interface PStoreProductRelationMapper extends BaseMapperPlus<PStoreProductRelationMapper, PStoreProductRelation, PStoreProductRelationVo> {

    /**
     * 前端-收藏/喜欢
     */
    Page<PStoreProductRelationVo> selectVoLeftPage(@Param("build") Page<PStoreProductRelationVo> build, @Param("ew") QueryWrapper<PStoreProductRelationVo> lqw);

    /**
     * 前端-取消收藏
     */
    int cancelOne(@Param("productId") Long id, @Param("userId") Long userId, @Param("type") String type);
}
